import {
	createRouter,
	createWebHashHistory,
	// createWebHistory,
} from "vue-router";

export default createRouter({
	history: createWebHashHistory(), // hash模式
	// history: createWebHistory(), // history模式
	routes: [
		{
			path: "/home",
			component: () => import("../views/Home.vue"),
		},
		{
			path: "/about",
			component: () => import("../views/About.vue"),
		},
		{
			// 匹配任意地址
			path: "/*",
			redirect: "/home",
		},
	],
});
